<html>
<head>
    <script src="../../OLLoader.js"></script>
    <script type="text/javascript">

        function test_ows(t) {
            t.plan(20);
            var xml = document.getElementById("ogcsample").firstChild.nodeValue;
            var doc = new OpenLayers.Format.XML().read(xml);
            var obj = new OpenLayers.Format.WMTSCapabilities().read(doc);
            // ows:ServiceIdentification
            var serviceIdentification = obj.serviceIdentification;
            t.eq(serviceIdentification.title, "Web Map Tile Service", "ows:ServiceIdentification title is correct");
            t.eq(serviceIdentification.serviceTypeVersion, "1.0.0", "ows:ServiceIdentification serviceTypeVersion is correct");
            t.eq(serviceIdentification.serviceType.value, "OGC WMTS", "ows:ServiceIdentification serviceType is correct");

            // ows:ServiceProvider
            var serviceProvider = obj.serviceProvider;
            t.eq(serviceProvider.providerName, "MiraMon", "ows:ServiceProvider providerName is correct");
            t.eq(serviceProvider.providerSite, "http://www.creaf.uab.es/miramon", "ows:ServiceProvider providerSite is correct");
            t.eq(serviceProvider.serviceContact.individualName, "Joan Maso Pau", "ows:ServiceProvider individualName is correct");
            t.eq(serviceProvider.serviceContact.positionName, "Senior Software Engineer", "ows:ServiceProvider positionName is correct");
            t.eq(serviceProvider.serviceContact.contactInfo.address.administrativeArea, "Barcelona", "ows:ServiceProvider address administrativeArea is correct");
            t.eq(serviceProvider.serviceContact.contactInfo.address.city, "Bellaterra", "ows:ServiceProvider address city is correct");
            t.eq(serviceProvider.serviceContact.contactInfo.address.country, "Spain", "ows:ServiceProvider address country is correct");
            t.eq(serviceProvider.serviceContact.contactInfo.address.deliveryPoint, "Fac Ciencies UAB", "ows:ServiceProvider address deliveryPoint is correct");
            t.eq(serviceProvider.serviceContact.contactInfo.address.electronicMailAddress, "joan.maso@uab.es", "ows:ServiceProvider address electronicMailAddress is correct");
            t.eq(serviceProvider.serviceContact.contactInfo.address.postalCode, "08193", "ows:ServiceProvider address postalCode is correct");
            t.eq(serviceProvider.serviceContact.contactInfo.phone.voice, "+34 93 581 1312", "ows:ServiceProvider phone voice is correct");

            // ows:OperationsMetadata
            var operationsMetadata = obj.operationsMetadata;
            t.eq(operationsMetadata.GetCapabilities.dcp.http.get[0].url, "http://www.miramon.uab.es/cgi-bin/MiraMon5_0.cgi?", "ows:OperationsMetadata GetCapabilities url is correct");
            t.eq(operationsMetadata.GetCapabilities.dcp.http.get[0].constraints.GetEncoding.allowedValues,
                 {'KVP': true},
                 "ows:OperationsMetadata GetCapabilities Constraints Get is correct");
            t.eq(operationsMetadata.GetFeatureInfo.dcp.http.get[0].url, "http://www.miramon.uab.es/cgi-bin/MiraMon5_0.cgi?", "ows:OperationsMetadata GetFeatureInfo url is correct");
            t.eq(operationsMetadata.GetFeatureInfo.dcp.http.get[0].constraints,
                 undefined,
                 "ows:OperationsMetadata GetFeatureInfo Constraints Get is correct");
            t.eq(operationsMetadata.GetTile.dcp.http.get[0].url, "http://www.miramon.uab.es/cgi-bin/MiraMon5_0.cgi?", "ows:OperationsMetadata GetTile url is correct");
            t.eq(operationsMetadata.GetTile.dcp.http.get[0].constraints,
                 undefined,
                 "ows:OperationsMetadata GetTile Constraints Get is correct");
        }

        function test_layers(t) {
            t.plan(43);
            var xml = document.getElementById("ogcsample").firstChild.nodeValue;
            var doc = new OpenLayers.Format.XML().read(xml);

            var obj = new OpenLayers.Format.WMTSCapabilities().read(doc);
            var contents = obj.contents;

            var numOfLayers = contents.layers.length;
            t.eq(numOfLayers, 1, "correct count of layers");

            var layer = contents.layers[0];
            t.eq(layer['abstract'], "Coastline/shorelines (BA010)", "layer abstract is correct");
            t.eq(layer.identifier, "coastlines", "layer identifier is correct");
            t.eq(layer.title, "Coastlines", "layer title is correct");

            var numOfFormats = layer.formats.length;
            t.eq(numOfFormats, 2, "correct count of formats");
            t.eq(layer.formats[0], "image/png", "format image/png is correct");
            t.eq(layer.formats[1], "image/gif", "format image/gif is correct");

            var numOfStyles = layer.styles.length;
            t.eq(numOfStyles, 2, "correct count of styles");
            t.eq(layer.styles[0].identifier, "DarkBlue", "style 0 identifier is correct");
            t.eq(layer.styles[0].isDefault, true, "style 0 isDefault is correct");
            t.eq(layer.styles[0].title, "Dark Blue", "style 0 title is correct");
            t.eq(layer.styles[0].legends[0].href, "http://www.miramon.uab.es/wmts/Coastlines/coastlines_darkBlue.png", "style 0 legend 0 href is correct");
            t.eq(layer.styles[0].legends[0].format, "image/png", "style 0 legend 0 format is correct");
            t.eq(layer.styles[1].identifier, "thickAndRed", "style 1 identifier is correct");
            t.ok(!layer.styles[1].isDefault, "style 1 isDefault is correct");
            t.eq(layer.styles[1].title, "Thick And Red", "style 1 title is correct");
            t.eq(layer.styles[1].legend, undefined, "style 1 legend is not set");
            //t.eq(layer.styles[1].abstract, "Specify this style if you want your maps to have thick red coastlines. ", "style 1 abstract is correct");

            t.eq(layer.tileMatrixSetLinks.length, 1, "correct count of tileMatrixSetLinks");
            t.eq(layer.tileMatrixSetLinks[0].tileMatrixSet, "BigWorld", "tileMatrixSet is correct");

            var wgs84Bbox = layer.bounds;
            t.ok(wgs84Bbox instanceof OpenLayers.Bounds, "wgs84BoudingBox instance of OpenLayers.Bounds");
            t.eq(wgs84Bbox.left, -180.0, "wgs84BoudingBox left is correct");
            t.eq(wgs84Bbox.right, 180.0, "wgs84BoudingBox right is correct");
            t.eq(wgs84Bbox.bottom, -90.0, "wgs84BoudingBox bottom is correct");
            t.eq(wgs84Bbox.top, 90.0, "wgs84BoudingBox top is correct");

            t.eq(layer.resourceUrl.tile.format, "image/png", "resourceUrl.tile.format is correct");
            t.eq(layer.resourceUrl.tile.template, "http://www.example.com/wmts/coastlines/{TileMatrix}/{TileRow}/{TileCol}.png",
                 "resourceUrl.tile.template is correct");

            t.eq(layer.resourceUrl.FeatureInfo.format, "application/gml+xml; version=3.1", "resourceUrl.FeatureInfo.format is correct");
            t.eq(layer.resourceUrl.FeatureInfo.template, "http://www.example.com/wmts/coastlines/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}/{J}/{I}.xml",
                 "resourceUrl.FeatureInfo.template is correct");

            t.eq(layer.resourceUrls[0].format, "image/png", "resourceUrls[0].format is correct");
            t.eq(layer.resourceUrls[0].resourceType, "tile", "resourceUrls[0].resourceType is correct");
            t.eq(layer.resourceUrls[0].template, "http://www.example.com/wmts/coastlines/{TileMatrix}/{TileRow}/{TileCol}.png",
                 "resourceUrls[0].template is correct");

            t.eq(layer.resourceUrls[1].format, "application/gml+xml; version=3.1", "resourceUrls[0].format is correct");
            t.eq(layer.resourceUrls[1].resourceType, "FeatureInfo", "resourceUrls[0].resourceType is correct");
            t.eq(layer.resourceUrls[1].template, "http://www.example.com/wmts/coastlines/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}/{J}/{I}.xml",
                 "resourceUrls[0].template is correct");

            var dimensions = layer.dimensions;
            t.eq(dimensions.length, 1, "correct count of dimensions");
            t.eq(dimensions[0].title, "Time", "first dimension title is correct");
            t.eq(dimensions[0]['abstract'], "Monthly datasets", "first dimension abstract is correct");
            t.eq(dimensions[0].identifier, "TIME", "first dimension identifier is correct");
            t.eq(dimensions[0]['default'], "default", "first dimension default is correct");
            t.eq(dimensions[0].values.length, 3, "first dimension has correct count of values");
            t.eq(dimensions[0].values[0], "2007-05", "first value is correct");
            t.eq(dimensions[0].values[1], "2007-06", "second value is correct");
            t.eq(dimensions[0].values[2], "2007-07", "third value is correct");
        }

        function test_tileMatrixSets(t) {
            t.plan(19);
            var xml = document.getElementById("ogcsample").firstChild.nodeValue;
            var doc = new OpenLayers.Format.XML().read(xml);

            var obj = new OpenLayers.Format.WMTSCapabilities().read(doc);

            var tileMatrixSets = obj.contents.tileMatrixSets;
            t.ok(tileMatrixSets['BigWorld'], "tileMatrixSets 'BigWorld' found");
            var bigWorld = tileMatrixSets['BigWorld'];
            t.eq(bigWorld.identifier, "BigWorld", "tileMatrixSets identifier is correct");
            t.eq(bigWorld.matrixIds.length, 2, "tileMatrix count is correct");
            t.eq(bigWorld.matrixIds[0].identifier, "1e6", "tileMatrix 0 identifier is correct");
            t.eq(bigWorld.matrixIds[0].matrixHeight, 50000, "tileMatrix 0 matrixHeight is correct");
            t.eq(bigWorld.matrixIds[0].matrixWidth, 60000, "tileMatrix 0 matrixWidth is correct");
            t.eq(bigWorld.matrixIds[0].scaleDenominator, 1000000, "tileMatrix 0 scaleDenominator is correct");
            t.eq(bigWorld.matrixIds[0].tileWidth, 256, "tileMatrix 0 tileWidth is correct");
            t.eq(bigWorld.matrixIds[0].tileHeight, 256, "tileMatrix 0 tileHeight is correct");
            t.eq(bigWorld.matrixIds[0].topLeftCorner.lon, -180, "tileMatrix 0 topLeftCorner.lon is correct");
            t.eq(bigWorld.matrixIds[0].topLeftCorner.lat, 84, "tileMatrix 0 topLeftCorner.lat is correct");

            t.eq(bigWorld.matrixIds[1].identifier, "2.5e6", "tileMatrix 1 identifier is correct");
            t.eq(bigWorld.matrixIds[1].matrixHeight, 7000, "tileMatrix 1 matrixHeight is correct");
            t.eq(bigWorld.matrixIds[1].matrixWidth, 9000, "tileMatrix 1 matrixWidth is correct");
            t.eq(bigWorld.matrixIds[1].scaleDenominator, 2500000, "tileMatrix 1 scaleDenominator is correct");
            t.eq(bigWorld.matrixIds[1].tileWidth, 256, "tileMatrix 1 tileWidth is correct");
            t.eq(bigWorld.matrixIds[1].tileHeight, 256, "tileMatrix 1 tileHeight is correct");
            t.eq(bigWorld.matrixIds[1].topLeftCorner.lon, -180, "tileMatrix 1 topLeftCorner.lon is correct");
            t.eq(bigWorld.matrixIds[1].topLeftCorner.lat, 84, "tileMatrix 1 topLeftCorner.lat is correct");
        }

        function test_tileMatrixSetLimits(t) {
            t.plan(7);
            var xml = document.getElementById("French-IGN-GeoPortal").firstChild.nodeValue;
            var doc = new OpenLayers.Format.XML().read(xml);

            var obj = new OpenLayers.Format.WMTSCapabilities().read(doc);

            var tileMatrixSetLink = obj.contents.layers[0].tileMatrixSetLinks[0];
            t.eq(tileMatrixSetLink.tileMatrixSet, "PM", "tileMatrixSet identifier in TileMatrixSetLink is correct");
            t.eq(tileMatrixSetLink.tileMatrixSetLimits.length, 13, "tileMatrixSetLimits number is correct");
            t.eq(tileMatrixSetLink.tileMatrixSetLimits[0].tileMatrix, "10", "tileMatrix identifier in tileMatrixSetLimits is correct");
            t.eq(tileMatrixSetLink.tileMatrixSetLimits[0].minTileRow, 336, "minTileRow is correct");
            t.eq(tileMatrixSetLink.tileMatrixSetLimits[0].maxTileRow, 576, "maxTileRow is correct");
            t.eq(tileMatrixSetLink.tileMatrixSetLimits[0].minTileCol, 336, "minTileCol is correct");
            t.eq(tileMatrixSetLink.tileMatrixSetLimits[0].maxTileCol, 671, "maxTileCol is correct");
        }

        function test_legendURL(t) {
            t.plan(7);
            var xml = document.getElementById("French-IGN-GeoPortal").firstChild.nodeValue;
            var doc = new OpenLayers.Format.XML().read(xml);

            var obj = new OpenLayers.Format.WMTSCapabilities().read(doc);

            var style = obj.contents.layers[0].styles[0];
            t.ok(style['legends'] && style['legends'][0], "Legend found in style");
            var legend = style.legends[0];
            t.eq(legend.format, "image/png", "Legend format is correct");
            t.eq(legend.href, "http://gpp3-wxs.ign.fr/static/LEGENDES/NOLEGEND.JPG", "Legend href is correct");
            t.eq(legend.minScaleDenominator, 200, "Legend minScaleDenominator is correct");
            t.eq(legend.maxScaleDenominator, 100000000, "Legend maxScaleDenominator is correct");
            t.eq(legend.width, 1, "Legend width is correct");
            t.eq(legend.height, 1, "Legend height is correct");
        }

        function test_infoFormats(t) {
            t.plan(2);
            var xml = document.getElementById("French-IGN-GeoPortal").firstChild.nodeValue;
            var doc = new OpenLayers.Format.XML().read(xml);

            var obj = new OpenLayers.Format.WMTSCapabilities().read(doc);

            var layer = obj.contents.layers[0];
            t.ok(layer.infoFormats, "infoFormats found for layer 0");
            t.eq(layer.infoFormats[2], "application/vnd.ogc.gml", "third infoFormat value is correct");
        }

        function test_createLayer(t) {
            t.plan(48);

            var format = new OpenLayers.Format.WMTSCapabilities();

            var xml = document.getElementById("ogcsample").firstChild.nodeValue;
            var doc = new OpenLayers.Format.XML().read(xml);

            var caps = format.read(doc);
            var layer;

            var success = true;
            try {
                // incomplete config (missing layer)
                layer = format.createLayer(caps, {
                });
            } catch (err) {
                success = false;
            }
            t.ok(!success, "createLayer throws error if provided incomplete layer config");

            // bogus layer identifier
            try {
                layer = format.createLayer(caps, {
                    layer: "foo",
                    matrixSet: "BigWorld"
                });
            } catch (err) {
                success = false;
            }
            t.ok(!success, "createLayer returns undefined given bad layer identifier");

            // bogus matrixSet identifier
            try {
                layer = format.createLayer(caps, {
                    layer: "coastlines",
                    matrixSet: "TheWorld"
                });
            } catch (err) {
                success = false;
            }
            t.ok(!success, "createLayer returns undefined given bad matrixSet identifier");

            // bogus projection
            try {
                layer = format.createLayer(caps, {
                    layer: "coastlines",
                    projection: "EPSG:3857"
                });
            } catch (err) {
                success = false;
            }
            t.ok(!success, "createLayer returns undefined given unsupported projection");

            layer = format.createLayer(caps, {
                layer: "coastlines",
                matrixSet: "BigWorld"
            });
            t.ok(layer instanceof OpenLayers.Layer.WMTS, "correct instance");

            layer = format.createLayer(caps, {
                layer: "coastlines",
                projection: "OGC:CRS84"
            });
            t.ok(layer instanceof OpenLayers.Layer.WMTS, "correct instance with CRS84 tile matrix set");
            
            // autodetect matrixSet
            layer = format.createLayer(caps, {
                layer: "coastlines"
            });
            t.ok(layer instanceof OpenLayers.Layer.WMTS, "correct instance, with autodetected matrixSet");

            t.eq(layer.matrixIds.length, 2, "correct matrixIds length");
            t.eq(layer.name, "Coastlines", "correct layer title");
            t.eq(layer.style, "DarkBlue", "correct style identifier");
            t.eq(layer.requestEncoding, "KVP", "correct requestEncoding");

            xml = document.getElementById("restsample").firstChild.nodeValue;
            doc = new OpenLayers.Format.XML().read(xml);
            caps = format.read(doc);
            layer = format.createLayer(caps, {
                layer: "ch.are.agglomerationen_isolierte_staedte-2000",
                matrixSet: "21781"
            });
            t.ok(layer instanceof OpenLayers.Layer.WMTS, "correct instance");
            t.eq(layer.url[0], "http://wmts.geo.admin.ch/1.0.0/ch.are.agglomerationen_isolierte_staedte-2000/default/{Time}/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}.png", "correct url");
            t.eq(layer.url[1], "http://wmts1.geo.admin.ch/1.0.0/ch.are.agglomerationen_isolierte_staedte-2000/default/{Time}/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}.png", "correct url");
            t.eq(layer.matrixIds.length, 3, "correct matrixIds length");
            t.eq(layer.requestEncoding, "REST", "correct requestEncoding");
            t.eq(layer.name, "Agglomérations et villes isolées", "correct layer title");
            t.eq(layer.style, "ch.are.agglomerationen_isolierte_staedte-2000", "correct style identifier");
            t.eq(layer.projection.getCode(), "EPSG:21781", "correct projection");
            t.eq(layer.units, "m", "correct untis");
            t.ok(layer.serverResolutions === layer.resolutions, "serverResolutions set");
            t.eq(layer.resolutions.length, 3, "correct resolutions length");
            t.ok((layer.resolutions[0] - 4000) < 1, "correct first resolution");
            t.eq(layer.dimensions.length, 1, "correct dimensions length");
            t.eq(layer.dimensions[0], "Time", "correct dimensions");
            t.eq(layer.params['TIME'], "20090101", "correct params");

            layer = format.createLayer(caps, {
                layer: "ch.are.agglomerationen_isolierte_staedte-2000",
                style: "toto",
                params: {"Time": "2012"}
            });
            t.eq(layer.matrixIds.length, 3, "correct matrixIds length");
            t.eq(layer.style, "toto", "correct style identifier");
            t.eq(layer.dimensions.length, 1, "correct dimensions length");
            t.eq(layer.dimensions[0], "Time", "correct dimensions");
            t.eq(layer.params['TIME'], "2012", "correct params");

            // test projection and units
            layer = format.createLayer(caps, {
                layer: "ch.are.agglomerationen_isolierte_staedte-2000",
                matrixSet: "21781",
                units: 'degrees'
            });
            t.eq(layer.units, "degrees", "correct units");
            layer = format.createLayer(caps, {
                layer: "ch.are.agglomerationen_isolierte_staedte-2000",
                matrixSet: "21781",
                projection: "EPSG:4326"
            });
            t.eq(layer.projection.getCode(), "EPSG:4326", "correct projection");
            t.eq(layer.units, "degrees", "correct units");
            layer = format.createLayer(caps, {
                layer: "ch.are.agglomerationen_isolierte_staedte-2000",
                matrixSet: "21781",
                projection: "EPSG:4326",
                units: 'm'
            });
            t.eq(layer.projection.getCode(), "EPSG:4326", "correct projection");
            t.eq(layer.units, "m", "correct units");
            layer = format.createLayer(caps, {
                layer: "ch.are.agglomerationen_isolierte_staedte-2000",
                matrixSet: "21781",
                projection: "EPSG:900913",
                units: 'degrees'
            });
            t.eq(layer.projection.getCode(), "EPSG:900913", "correct projection");
            t.eq(layer.units, "degrees", "correct units");


            // test get the right url #608/3
            xml = document.getElementById("multi-getile-1").firstChild.nodeValue;
            doc = new OpenLayers.Format.XML().read(xml);
            caps = format.read(doc);
            layer = format.createLayer(caps, {
                layer: "ch.are.agglomerationen_isolierte_staedte-2000",
                matrixSet: "21781",
                requestEncoding: 'REST'
            });
            t.eq(layer.url[0], "http://wmts.geo.admin.ch/rest", "correct rest url 1");
            t.eq(layer.url[1], "http://wmts1.geo.admin.ch/rest", "correct rest url 1");
            layer = format.createLayer(caps, {
                layer: "ch.are.agglomerationen_isolierte_staedte-2000",
                matrixSet: "21781",
                requestEncoding: 'KVP'
            });
            t.eq(layer.url[0], "http://wmts.geo.admin.ch/kvp", "correct kvp url 2");
            t.eq(layer.url[1], "http://wmts1.geo.admin.ch/kvp", "correct kvp url 2");
            xml = document.getElementById("multi-getile-2").firstChild.nodeValue;
            doc = new OpenLayers.Format.XML().read(xml);
            caps = format.read(doc);
            layer = format.createLayer(caps, {
                layer: "ch.are.agglomerationen_isolierte_staedte-2000",
                matrixSet: "21781",
                requestEncoding: 'REST'
            });
            t.eq(layer.url[0], "http://wmts.geo.admin.ch/rest", "correct rest url 2");
            layer = format.createLayer(caps, {
                layer: "ch.are.agglomerationen_isolierte_staedte-2000",
                matrixSet: "21781",
                requestEncoding: 'KVP'
            });
            t.eq(layer.url[0], "http://wmts.geo.admin.ch/kvp", "correct kvp url 2");

            // test RESTfull
            xml = document.getElementById("arcgis").firstChild.nodeValue;
            doc = new OpenLayers.Format.XML().read(xml);
            caps = format.read(doc);
            layer = format.createLayer(caps, {
                layer: "WorldTimeZones"
            });
            t.eq(layer.requestEncoding, "REST", "correct requestEncoding (in RESTfull)");
            
            // test serverresolutions and min/maxScaleDenominator
            xml = document.getElementById("French-IGN-GeoPortal").firstChild.nodeValue;
            doc = new OpenLayers.Format.XML().read(xml);
            caps = format.read(doc);
            layer = format.createLayer(caps, {
                layer: "ADMINISTRATIVEUNITS.BOUNDARIES"
            });
            t.eq(layer.serverResolutions.length, 13, "correct number of server resolutions");
            t.eq(layer.maxScale, 1/2132, "correct maxScale");
            t.eq(layer.minScale, 1/8735661, "correct minScale");
        }

        function test_parse_projection(t) {
            t.plan(2);

            var format = new OpenLayers.Format.WMTSCapabilities();

            var xml = document.getElementById("restsample-alternate-proj1").firstChild.nodeValue;
            var doc = new OpenLayers.Format.XML().read(xml);
            var caps = format.read(doc);
            var layer = format.createLayer(caps, {
                layer: "ch.are.agglomerationen_isolierte_staedte-2000",
                matrixSet: "21781"
            });
            t.eq(layer.projection.getCode(), "EPSG:21781", "correct projection");

            xml = document.getElementById("restsample-alternate-proj2").firstChild.nodeValue;
            doc = new OpenLayers.Format.XML().read(xml);
            caps = format.read(doc);
            layer = format.createLayer(caps, {
                layer: "ch.are.agglomerationen_isolierte_staedte-2000",
                matrixSet: "21781"
            });
            t.eq(layer.projection.getCode(), "EPSG:21781", "correct projection");
        }
    </script>
</head>
<body>

<!--
OGC example below taken from
http://schemas.opengis.net/wmts/1.0/examples/wmtsGetCapabilities_response.xml
-->
<div id="ogcsample"><!--
<?xml version="1.0" encoding="UTF-8"?>
<Capabilities xmlns="http://www.opengis.net/wmts/1.0" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:gml="http://www.opengis.net/gml" xsi:schemaLocation="http://www.opengis.net/wmts/1.0 http://schemas.opengis.net/wmts/1.0/wmtsGetCapabilities_response.xsd" version="1.0.0">
    <ows:ServiceIdentification>
        <ows:Title>Web Map Tile Service</ows:Title>
        <ows:Abstract>Service that contrains the map access interface to some TileMatrixSets</ows:Abstract>
        <ows:Keywords>
            <ows:Keyword>tile</ows:Keyword>
            <ows:Keyword>tile matrix set</ows:Keyword>
            <ows:Keyword>map</ows:Keyword>
        </ows:Keywords>
        <ows:ServiceType>OGC WMTS</ows:ServiceType>
        <ows:ServiceTypeVersion>1.0.0</ows:ServiceTypeVersion>
        <ows:Fees>none</ows:Fees>
        <ows:AccessConstraints>none</ows:AccessConstraints>
    </ows:ServiceIdentification>
    <ows:ServiceProvider>
        <ows:ProviderName>MiraMon</ows:ProviderName>
        <ows:ProviderSite xlink:href="http://www.creaf.uab.es/miramon"/>
        <ows:ServiceContact>
            <ows:IndividualName>Joan Maso Pau</ows:IndividualName>
            <ows:PositionName>Senior Software Engineer</ows:PositionName>
            <ows:ContactInfo>
                <ows:Phone>
                    <ows:Voice>+34 93 581 1312</ows:Voice>
                    <ows:Facsimile>+34 93 581 4151</ows:Facsimile>
                </ows:Phone>
                <ows:Address>
                    <ows:DeliveryPoint>Fac Ciencies UAB</ows:DeliveryPoint>
                    <ows:City>Bellaterra</ows:City>
                    <ows:AdministrativeArea>Barcelona</ows:AdministrativeArea>
                    <ows:PostalCode>08193</ows:PostalCode>
                    <ows:Country>Spain</ows:Country>
                    <ows:ElectronicMailAddress>joan.maso@uab.es</ows:ElectronicMailAddress>
                </ows:Address>
            </ows:ContactInfo>
        </ows:ServiceContact>
    </ows:ServiceProvider>
    <ows:OperationsMetadata>
        <ows:Operation name="GetCapabilities">
            <ows:DCP>
                <ows:HTTP>
                    <ows:Get xlink:href="http://www.miramon.uab.es/cgi-bin/MiraMon5_0.cgi?">
                        <ows:Constraint name="GetEncoding">
                            <ows:AllowedValues>
                                <ows:Value>KVP</ows:Value>
                            </ows:AllowedValues>
                        </ows:Constraint>
                    </ows:Get>
                </ows:HTTP>
            </ows:DCP>
        </ows:Operation>
        <ows:Operation name="GetTile">
            <ows:DCP>
                <ows:HTTP>
                    <ows:Get xlink:href="http://www.miramon.uab.es/cgi-bin/MiraMon5_0.cgi?"/>
                </ows:HTTP>
            </ows:DCP>
        </ows:Operation>
        <ows:Operation name="GetFeatureInfo">
            <ows:DCP>
                <ows:HTTP>
                    <ows:Get xlink:href="http://www.miramon.uab.es/cgi-bin/MiraMon5_0.cgi?"/>
                </ows:HTTP>
            </ows:DCP>
        </ows:Operation>
    </ows:OperationsMetadata>
    <Contents>
        <Layer>
            <ows:Title>Coastlines</ows:Title>
            <ows:Abstract>Coastline/shorelines (BA010)</ows:Abstract>
            <ows:WGS84BoundingBox>
                <ows:LowerCorner>-180 -90</ows:LowerCorner>
                <ows:UpperCorner>180 90</ows:UpperCorner>
            </ows:WGS84BoundingBox>
            <ows:Identifier>coastlines</ows:Identifier>
            <ResourceURL format="image/png" resourceType="tile"
                         template="http://www.example.com/wmts/coastlines/{TileMatrix}/{TileRow}/{TileCol}.png" />
            <ResourceURL format="application/gml+xml; version=3.1" resourceType="FeatureInfo"
                         template="http://www.example.com/wmts/coastlines/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}/{J}/{I}.xml" />
            <Style isDefault="true">
                <ows:Title>Dark Blue</ows:Title>
                <ows:Identifier>DarkBlue</ows:Identifier>
                <LegendURL format="image/png" xlink:href="http://www.miramon.uab.es/wmts/Coastlines/coastlines_darkBlue.png"/>
            </Style>
            <Style>
                <ows:Title>Thick And Red</ows:Title>
                <ows:Abstract>Specify this style if you want your maps to have thick red coastlines.
                </ows:Abstract>
                <ows:Identifier>thickAndRed</ows:Identifier>
            </Style>
            <Format>image/png</Format>
            <Format>image/gif</Format>
            <Dimension>
                <ows:Title>Time</ows:Title>
                <ows:Abstract>Monthly datasets</ows:Abstract>
                <ows:Identifier>TIME</ows:Identifier>
                <Value>2007-05</Value>
                <Value>2007-06</Value>
                <Value>2007-07</Value>
                <Default>default</Default>
            </Dimension>
            <TileMatrixSetLink>
                <TileMatrixSet>BigWorld</TileMatrixSet>
            </TileMatrixSetLink>
        </Layer>
        <TileMatrixSet>
            <ows:Identifier>BigWorld</ows:Identifier>
            <ows:SupportedCRS>urn:ogc:def:crs:OGC:1.3:CRS84</ows:SupportedCRS>
            <TileMatrix>
                <ows:Identifier>1e6</ows:Identifier>
                <ScaleDenominator>1e6</ScaleDenominator>
                <TopLeftCorner>-180 84</TopLeftCorner>
                <TileWidth>256</TileWidth>
                <TileHeight>256</TileHeight>
                <MatrixWidth>60000</MatrixWidth>
                <MatrixHeight>50000</MatrixHeight>
            </TileMatrix>
            <TileMatrix>
                <ows:Identifier>2.5e6</ows:Identifier>
                <ScaleDenominator>2.5e6</ScaleDenominator>
                <TopLeftCorner>-180 84</TopLeftCorner>
                <TileWidth>256</TileWidth>
                <TileHeight>256</TileHeight>
                <MatrixWidth>9000</MatrixWidth>
                <MatrixHeight>7000</MatrixHeight>
            </TileMatrix>
        </TileMatrixSet>
    </Contents>
    <Themes>
        <Theme>
            <ows:Title>Foundation</ows:Title>
            <ows:Abstract>"Digital Chart Of The World" data</ows:Abstract>
            <ows:Identifier>Foundation</ows:Identifier>
            <Theme>
                <ows:Title>Boundaries</ows:Title>
                <ows:Identifier>Boundaries</ows:Identifier>
                <LayerRef>coastlines</LayerRef>
                <LayerRef>politicalBoundaries</LayerRef>
                <LayerRef>depthContours</LayerRef>
            </Theme>
            <Theme>
                <ows:Title>Transportation</ows:Title>
                <ows:Identifier>Transportation</ows:Identifier>
                <LayerRef>roads</LayerRef>
                <LayerRef>railroads</LayerRef>
                <LayerRef>airports</LayerRef>
            </Theme>
        </Theme>
        <Theme>
            <ows:Title>World Geology</ows:Title>
            <ows:Identifier>World Geology</ows:Identifier>
            <LayerRef>worldAgeRockType</LayerRef>
            <LayerRef>worldFaultLines</LayerRef>
            <LayerRef>felsicMagmatic</LayerRef>
            <LayerRef>maficMagmatic</LayerRef>
        </Theme>
    </Themes>
</Capabilities>
--></div>

<div id="restsample"><!--
<?xml version="1.0" encoding="UTF-8"?>
<Capabilities xmlns="http://www.opengis.net/wmts/1.0" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:gml="http://www.opengis.net/gml" xsi:schemaLocation="http://www.opengis.net/wmts/1.0 http://schemas.opengis.net/wmts/1.0/wmtsGetCapabilities_response.xsd" version="1.0.0">
    <ows:ServiceIdentification>
        <ows:Title>Federal Geodata Infrastructure of Switzerland</ows:Title>
        <ows:Abstract>Some Geodata are subject to license and fees</ows:Abstract>
        <ows:Keywords>
            <ows:Keyword>FGDI</ows:Keyword>
            <ows:Keyword>Pixelkarte</ows:Keyword>
            <ows:Keyword>Switzerland</ows:Keyword>
        </ows:Keywords>
        <ows:ServiceType>OGC WMTS</ows:ServiceType>
        <ows:ServiceTypeVersion>1.0.0</ows:ServiceTypeVersion>
        <ows:Fees>yes</ows:Fees>
        <ows:AccessConstraints>license</ows:AccessConstraints>
    </ows:ServiceIdentification>
    <ows:ServiceProvider>
        <ows:ProviderName>swisstopo</ows:ProviderName>
        <ows:ProviderSite xlink:href="http://www.swisstopo.admin.ch"/>
        <ows:ServiceContact>
            <ows:IndividualName>David Oesch</ows:IndividualName>
            <ows:PositionName></ows:PositionName>
            <ows:ContactInfo>
                <ows:Phone>
                    <ows:Voice>+41 (0)31 / 963 21 11</ows:Voice>
                    <ows:Facsimile>+41 (0)31 / 963 24 59</ows:Facsimile>
                </ows:Phone>
                <ows:Address>
                    <ows:DeliveryPoint>swisstopo</ows:DeliveryPoint>
                    <ows:City>Bern</ows:City>
                    <ows:AdministrativeArea>BE</ows:AdministrativeArea>
                    <ows:PostalCode>3084</ows:PostalCode>
                    <ows:Country>Switzerland</ows:Country>
                    <ows:ElectronicMailAddress/>
                </ows:Address>
            </ows:ContactInfo>
        </ows:ServiceContact>
    </ows:ServiceProvider>
    <ows:OperationsMetadata>
        <ows:Operation name="GetCapabilities">
            <ows:DCP>
                <ows:HTTP>
                    <ows:Get xlink:href="http://wmts.geo.admin.ch/1.0.0/WMTSCapabilities.xml">
                        <ows:Constraint name="GetEncoding">
                            <ows:AllowedValues>
                                <ows:Value>REST</ows:Value>
                            </ows:AllowedValues>
                        </ows:Constraint>
                    </ows:Get>
                </ows:HTTP>
            </ows:DCP>
        </ows:Operation>
        <ows:Operation name="GetTile">
            <ows:DCP>
                <ows:HTTP>
                    <ows:Get xlink:href="http://wmts.geo.admin.ch/">
                        <ows:Constraint name="GetEncoding">
                            <ows:AllowedValues>
                                <ows:Value>REST</ows:Value>
                            </ows:AllowedValues>
                        </ows:Constraint>
                    </ows:Get>
                </ows:HTTP>
            </ows:DCP>
        </ows:Operation>
    </ows:OperationsMetadata>
    <Contents>
        <Layer>
            <ows:Title>Agglomérations et villes isolées</ows:Title>
            <ows:Abstract>Les agglomérations et villes isolées (communes non rattachées à une agglomération et comptant au moins 10`000 habitants) font partie des régions d’analyse de la statistique suisse. Ce niveau géographique est défini depuis plus de 100 ans, afin de mesurer l’urbanisation, phénomène fondamental structurant l’organisation du territoire. Sa fonction principale est de permettre une comparaison spatiale entre des espaces urbains inégalement délimités sur le plan institutionnel. Une version ancienne est appliquée pour la première fois en 1930, puis révisée en 1984 et 1990, toujours sur la base des recensements de la population. La version actuelle classe les 2896 communes de Suisse (état 2000) selon leur appartenance ou pas à une agglomération ou ville isolée en fonction de critères statistiques (Etat et évolution de la population, lien de continuité de la zone bâtie, rapport entre population active occupée et population résidante, structure économique et flux de pendulaires). Les agglomérations et les villes isolées forment l`espace urbain, les territoires restant l`espace rural. La définition des agglomérations de l’OFS n’a pas valeur d’obligation légale.</ows:Abstract>
            <ows:WGS84BoundingBox>
                <ows:LowerCorner>5.140242 45.398181</ows:LowerCorner>
                <ows:UpperCorner>11.47757 48.230651</ows:UpperCorner>
            </ows:WGS84BoundingBox>
            <ows:Identifier>ch.are.agglomerationen_isolierte_staedte-2000</ows:Identifier>
            <ows:Metadata xlink:href="http://www.swisstopo.admin.ch/SITiled/world/AdminBoundaries/metadata.htm"/>
            <Style>
                <ows:Title>Agglomérations et villes isolées</ows:Title>
                <ows:Identifier>ch.are.agglomerationen_isolierte_staedte-2000</ows:Identifier>
                <LegendURL format="image/png" xlink:href="http://api.geo.admin.ch/legend/ch.are.agglomerationen_isolierte_staedte-2000_fr.png" />
            </Style>
            <Format>image/png</Format>
            <Dimension>
                <ows:Identifier>Time</ows:Identifier>
                <Default>20090101</Default>
                <Value>20090101</Value>
            </Dimension>
            <TileMatrixSetLink>
                <TileMatrixSet>21781</TileMatrixSet>
            </TileMatrixSetLink>
            <ResourceURL format="image/png" resourceType="tile" template="http://wmts.geo.admin.ch/1.0.0/ch.are.agglomerationen_isolierte_staedte-2000/default/{Time}/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}.png"/>
            <ResourceURL format="image/png" resourceType="tile" template="http://wmts1.geo.admin.ch/1.0.0/ch.are.agglomerationen_isolierte_staedte-2000/default/{Time}/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}.png"/>
        </Layer>
        <TileMatrixSet>
            <ows:Identifier>21781</ows:Identifier>
            <ows:SupportedCRS>urn:ogc:def:crs:EPSG::21781</ows:SupportedCRS>
            <TileMatrix>
                <ows:Identifier>0</ows:Identifier>
                <ScaleDenominator>14285750.5715</ScaleDenominator>
                <TopLeftCorner>420000.0 350000.0</TopLeftCorner>
                <TileWidth>256</TileWidth>
                <TileHeight>256</TileHeight>
                <MatrixWidth>1</MatrixWidth>
                <MatrixHeight>1</MatrixHeight>
            </TileMatrix>
            <TileMatrix>
                <ows:Identifier>8</ows:Identifier>
                <ScaleDenominator>7142875.28575</ScaleDenominator>
                <TopLeftCorner>420000.0 350000.0</TopLeftCorner>
                <TileWidth>256</TileWidth>
                <TileHeight>256</TileHeight>
                <MatrixWidth>1</MatrixWidth>
                <MatrixHeight>1</MatrixHeight>
            </TileMatrix>
            <TileMatrix>
                <ows:Identifier>12</ows:Identifier>
                <ScaleDenominator>3571437.64288</ScaleDenominator>
                <TopLeftCorner>420000.0 350000.0</TopLeftCorner>
                <TileWidth>256</TileWidth>
                <TileHeight>256</TileHeight>
                <MatrixWidth>2</MatrixWidth>
                <MatrixHeight>2</MatrixHeight>
            </TileMatrix>
        </TileMatrixSet>
    </Contents>
    <ServiceMetadataURL xlink:href="http://www.opengis.uab.es/SITiled/world/1.0.0/WMTSCapabilities.xml"/>
</Capabilities>
--></div>

<div id="restsample-alternate-proj1"><!--
<?xml version="1.0" encoding="UTF-8"?>
<Capabilities xmlns="http://www.opengis.net/wmts/1.0" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:gml="http://www.opengis.net/gml" xsi:schemaLocation="http://www.opengis.net/wmts/1.0 http://schemas.opengis.net/wmts/1.0/wmtsGetCapabilities_response.xsd" version="1.0.0">
    <ows:OperationsMetadata>
        <ows:Operation name="GetCapabilities">
            <ows:DCP>
                <ows:HTTP>
                    <ows:Get xlink:href="http://wmts.geo.admin.ch/1.0.0/WMTSCapabilities.xml">
                        <ows:Constraint name="GetEncoding">
                            <ows:AllowedValues>
                                <ows:Value>REST</ows:Value>
                            </ows:AllowedValues>
                        </ows:Constraint>
                    </ows:Get>
                </ows:HTTP>
            </ows:DCP>
        </ows:Operation>
        <ows:Operation name="GetTile">
            <ows:DCP>
                <ows:HTTP>
                    <ows:Get xlink:href="http://wmts.geo.admin.ch/">
                        <ows:Constraint name="GetEncoding">
                            <ows:AllowedValues>
                                <ows:Value>REST</ows:Value>
                            </ows:AllowedValues>
                        </ows:Constraint>
                    </ows:Get>
                </ows:HTTP>
            </ows:DCP>
        </ows:Operation>
    </ows:OperationsMetadata>
    <Contents>
        <Layer>
            <ows:Title>Agglomérations et villes isolées</ows:Title>
            <ows:Abstract>Les agglomérations et villes isolées (communes non rattachées à une agglomération et comptant au moins 10`000 habitants) font partie des régions d’analyse de la statistique suisse. Ce niveau géographique est défini depuis plus de 100 ans, afin de mesurer l’urbanisation, phénomène fondamental structurant l’organisation du territoire. Sa fonction principale est de permettre une comparaison spatiale entre des espaces urbains inégalement délimités sur le plan institutionnel. Une version ancienne est appliquée pour la première fois en 1930, puis révisée en 1984 et 1990, toujours sur la base des recensements de la population. La version actuelle classe les 2896 communes de Suisse (état 2000) selon leur appartenance ou pas à une agglomération ou ville isolée en fonction de critères statistiques (Etat et évolution de la population, lien de continuité de la zone bâtie, rapport entre population active occupée et population résidante, structure économique et flux de pendulaires). Les agglomérations et les villes isolées forment l`espace urbain, les territoires restant l`espace rural. La définition des agglomérations de l’OFS n’a pas valeur d’obligation légale.</ows:Abstract>
            <ows:WGS84BoundingBox>
                <ows:LowerCorner>5.140242 45.398181</ows:LowerCorner>
                <ows:UpperCorner>11.47757 48.230651</ows:UpperCorner>
            </ows:WGS84BoundingBox>
            <ows:Identifier>ch.are.agglomerationen_isolierte_staedte-2000</ows:Identifier>
            <ows:Metadata xlink:href="http://www.swisstopo.admin.ch/SITiled/world/AdminBoundaries/metadata.htm"/>
            <Style>
                <ows:Title>Agglomérations et villes isolées</ows:Title>
                <ows:Identifier>ch.are.agglomerationen_isolierte_staedte-2000</ows:Identifier>
                <LegendURL format="image/png" xlink:href="http://api.geo.admin.ch/legend/ch.are.agglomerationen_isolierte_staedte-2000_fr.png" />
            </Style>
            <Format>image/png</Format>
            <Dimension>
                <ows:Identifier>Time</ows:Identifier>
                <Default>20090101</Default>
                <Value>20090101</Value>
            </Dimension>
            <TileMatrixSetLink>
                <TileMatrixSet>21781</TileMatrixSet>
            </TileMatrixSetLink>
            <ResourceURL format="image/png" resourceType="tile" template="http://wmts.geo.admin.ch/1.0.0/ch.are.agglomerationen_isolierte_staedte-2000/default/{Time}/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}.png"/>
        </Layer>
        <TileMatrixSet>
            <ows:Identifier>21781</ows:Identifier>
            <ows:SupportedCRS>urn:ogc:def:crs:EPSG:21781</ows:SupportedCRS>
            <TileMatrix>
                <ows:Identifier>0</ows:Identifier>
                <ScaleDenominator>14285750.5715</ScaleDenominator>
                <TopLeftCorner>420000.0 350000.0</TopLeftCorner>
                <TileWidth>256</TileWidth>
                <TileHeight>256</TileHeight>
                <MatrixWidth>1</MatrixWidth>
                <MatrixHeight>1</MatrixHeight>
            </TileMatrix>
        </TileMatrixSet>
    </Contents>
    <ServiceMetadataURL xlink:href="http://www.opengis.uab.es/SITiled/world/1.0.0/WMTSCapabilities.xml"/>
</Capabilities>
--></div>

<div id="restsample-alternate-proj2"><!--
<?xml version="1.0" encoding="UTF-8"?>
<Capabilities xmlns="http://www.opengis.net/wmts/1.0" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:gml="http://www.opengis.net/gml" xsi:schemaLocation="http://www.opengis.net/wmts/1.0 http://schemas.opengis.net/wmts/1.0/wmtsGetCapabilities_response.xsd" version="1.0.0">
    <ows:OperationsMetadata>
        <ows:Operation name="GetCapabilities">
            <ows:DCP>
                <ows:HTTP>
                    <ows:Get xlink:href="http://wmts.geo.admin.ch/1.0.0/WMTSCapabilities.xml">
                        <ows:Constraint name="GetEncoding">
                            <ows:AllowedValues>
                                <ows:Value>REST</ows:Value>
                            </ows:AllowedValues>
                        </ows:Constraint>
                    </ows:Get>
                </ows:HTTP>
            </ows:DCP>
        </ows:Operation>
        <ows:Operation name="GetTile">
            <ows:DCP>
                <ows:HTTP>
                    <ows:Get xlink:href="http://wmts.geo.admin.ch/">
                        <ows:Constraint name="GetEncoding">
                            <ows:AllowedValues>
                                <ows:Value>REST</ows:Value>
                            </ows:AllowedValues>
                        </ows:Constraint>
                    </ows:Get>
                </ows:HTTP>
            </ows:DCP>
        </ows:Operation>
    </ows:OperationsMetadata>
    <Contents>
        <Layer>
            <ows:Title>Agglomérations et villes isolées</ows:Title>
            <ows:Abstract>Les agglomérations et villes isolées (communes non rattachées à une agglomération et comptant au moins 10`000 habitants) font partie des régions d’analyse de la statistique suisse. Ce niveau géographique est défini depuis plus de 100 ans, afin de mesurer l’urbanisation, phénomène fondamental structurant l’organisation du territoire. Sa fonction principale est de permettre une comparaison spatiale entre des espaces urbains inégalement délimités sur le plan institutionnel. Une version ancienne est appliquée pour la première fois en 1930, puis révisée en 1984 et 1990, toujours sur la base des recensements de la population. La version actuelle classe les 2896 communes de Suisse (état 2000) selon leur appartenance ou pas à une agglomération ou ville isolée en fonction de critères statistiques (Etat et évolution de la population, lien de continuité de la zone bâtie, rapport entre population active occupée et population résidante, structure économique et flux de pendulaires). Les agglomérations et les villes isolées forment l`espace urbain, les territoires restant l`espace rural. La définition des agglomérations de l’OFS n’a pas valeur d’obligation légale.</ows:Abstract>
            <ows:WGS84BoundingBox>
                <ows:LowerCorner>5.140242 45.398181</ows:LowerCorner>
                <ows:UpperCorner>11.47757 48.230651</ows:UpperCorner>
            </ows:WGS84BoundingBox>
            <ows:Identifier>ch.are.agglomerationen_isolierte_staedte-2000</ows:Identifier>
            <ows:Metadata xlink:href="http://www.swisstopo.admin.ch/SITiled/world/AdminBoundaries/metadata.htm"/>
            <Style>
                <ows:Title>Agglomérations et villes isolées</ows:Title>
                <ows:Identifier>ch.are.agglomerationen_isolierte_staedte-2000</ows:Identifier>
                <LegendURL format="image/png" xlink:href="http://api.geo.admin.ch/legend/ch.are.agglomerationen_isolierte_staedte-2000_fr.png" />
            </Style>
            <Format>image/png</Format>
            <Dimension>
                <ows:Identifier>Time</ows:Identifier>
                <Default>20090101</Default>
                <Value>20090101</Value>
            </Dimension>
            <TileMatrixSetLink>
                <TileMatrixSet>21781</TileMatrixSet>
            </TileMatrixSetLink>
            <ResourceURL format="image/png" resourceType="tile" template="http://wmts.geo.admin.ch/1.0.0/ch.are.agglomerationen_isolierte_staedte-2000/default/{Time}/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}.png"/>
        </Layer>
        <TileMatrixSet>
            <ows:Identifier>21781</ows:Identifier>
            <ows:SupportedCRS>urn:ogc:def:crs:EPSG:1.0:21781</ows:SupportedCRS>
            <TileMatrix>
                <ows:Identifier>0</ows:Identifier>
                <ScaleDenominator>14285750.5715</ScaleDenominator>
                <TopLeftCorner>420000.0 350000.0</TopLeftCorner>
                <TileWidth>256</TileWidth>
                <TileHeight>256</TileHeight>
                <MatrixWidth>1</MatrixWidth>
                <MatrixHeight>1</MatrixHeight>
            </TileMatrix>
        </TileMatrixSet>
    </Contents>
    <ServiceMetadataURL xlink:href="http://www.opengis.uab.es/SITiled/world/1.0.0/WMTSCapabilities.xml"/>
</Capabilities>
--></div>

<div id="multi-getile-1"><!--
<?xml version="1.0" encoding="UTF-8"?>
<Capabilities xmlns="http://www.opengis.net/wmts/1.0" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:gml="http://www.opengis.net/gml" xsi:schemaLocation="http://www.opengis.net/wmts/1.0 http://schemas.opengis.net/wmts/1.0/wmtsGetCapabilities_response.xsd" version="1.0.0">
    <ows:OperationsMetadata>
        <ows:Operation name="GetCapabilities">
            <ows:DCP>
                <ows:HTTP>
                    <ows:Get xlink:href="http://wmts.geo.admin.ch/1.0.0/WMTSCapabilities.xml">
                        <ows:Constraint name="GetEncoding">
                            <ows:AllowedValues>
                                <ows:Value>REST</ows:Value>
                            </ows:AllowedValues>
                        </ows:Constraint>
                    </ows:Get>
                </ows:HTTP>
            </ows:DCP>
        </ows:Operation>
        <ows:Operation name="GetTile">
            <ows:DCP>
                <ows:HTTP>
                    <ows:Get xlink:href="http://wmts.geo.admin.ch/rest">
                        <ows:Constraint name="GetEncoding">
                            <ows:AllowedValues>
                                <ows:Value>REST</ows:Value>
                            </ows:AllowedValues>
                        </ows:Constraint>
                    </ows:Get>
                    <ows:Get xlink:href="http://wmts1.geo.admin.ch/rest">
                        <ows:Constraint name="GetEncoding">
                            <ows:AllowedValues>
                                <ows:Value>REST</ows:Value>
                            </ows:AllowedValues>
                        </ows:Constraint>
                    </ows:Get>
                    <ows:Get xlink:href="http://wmts.geo.admin.ch/kvp">
                        <ows:Constraint name="GetEncoding">
                            <ows:AllowedValues>
                                <ows:Value>KVP</ows:Value>
                            </ows:AllowedValues>
                        </ows:Constraint>
                    </ows:Get>
                    <ows:Get xlink:href="http://wmts1.geo.admin.ch/kvp">
                        <ows:Constraint name="GetEncoding">
                            <ows:AllowedValues>
                                <ows:Value>KVP</ows:Value>
                            </ows:AllowedValues>
                        </ows:Constraint>
                    </ows:Get>
                </ows:HTTP>
            </ows:DCP>
        </ows:Operation>
    </ows:OperationsMetadata>
    <Contents>
        <Layer>
            <ows:Title>Agglomérations et villes isolées</ows:Title>
            <ows:Abstract>Les agglomérations et villes isolées (communes non rattachées à une agglomération et comptant au moins 10`000 habitants) font partie des régions d’analyse de la statistique suisse. Ce niveau géographique est défini depuis plus de 100 ans, afin de mesurer l’urbanisation, phénomène fondamental structurant l’organisation du territoire. Sa fonction principale est de permettre une comparaison spatiale entre des espaces urbains inégalement délimités sur le plan institutionnel. Une version ancienne est appliquée pour la première fois en 1930, puis révisée en 1984 et 1990, toujours sur la base des recensements de la population. La version actuelle classe les 2896 communes de Suisse (état 2000) selon leur appartenance ou pas à une agglomération ou ville isolée en fonction de critères statistiques (Etat et évolution de la population, lien de continuité de la zone bâtie, rapport entre population active occupée et population résidante, structure économique et flux de pendulaires). Les agglomérations et les villes isolées forment l`espace urbain, les territoires restant l`espace rural. La définition des agglomérations de l’OFS n’a pas valeur d’obligation légale.</ows:Abstract>
            <ows:WGS84BoundingBox>
                <ows:LowerCorner>5.140242 45.398181</ows:LowerCorner>
                <ows:UpperCorner>11.47757 48.230651</ows:UpperCorner>
            </ows:WGS84BoundingBox>
            <ows:Identifier>ch.are.agglomerationen_isolierte_staedte-2000</ows:Identifier>
            <ows:Metadata xlink:href="http://www.swisstopo.admin.ch/SITiled/world/AdminBoundaries/metadata.htm"/>
            <Style>
                <ows:Title>Agglomérations et villes isolées</ows:Title>
                <ows:Identifier>ch.are.agglomerationen_isolierte_staedte-2000</ows:Identifier>
                <LegendURL format="image/png" xlink:href="http://api.geo.admin.ch/legend/ch.are.agglomerationen_isolierte_staedte-2000_fr.png" />
            </Style>
            <Format>image/png</Format>
            <Dimension>
                <ows:Identifier>Time</ows:Identifier>
                <Default>20090101</Default>
                <Value>20090101</Value>
            </Dimension>
            <TileMatrixSetLink>
                <TileMatrixSet>21781</TileMatrixSet>
            </TileMatrixSetLink>
        </Layer>
        <TileMatrixSet>
            <ows:Identifier>21781</ows:Identifier>
            <ows:SupportedCRS>urn:ogc:def:crs:EPSG:1.0:21781</ows:SupportedCRS>
            <TileMatrix>
                <ows:Identifier>0</ows:Identifier>
                <ScaleDenominator>14285750.5715</ScaleDenominator>
                <TopLeftCorner>420000.0 350000.0</TopLeftCorner>
                <TileWidth>256</TileWidth>
                <TileHeight>256</TileHeight>
                <MatrixWidth>1</MatrixWidth>
                <MatrixHeight>1</MatrixHeight>
            </TileMatrix>
        </TileMatrixSet>
    </Contents>
    <ServiceMetadataURL xlink:href="http://www.opengis.uab.es/SITiled/world/1.0.0/WMTSCapabilities.xml"/>
</Capabilities>
--></div>
<div id="arcgis"><!--
<?xml version="1.0" encoding="UTF-8"?>
<Capabilities xmlns="http://www.opengis.net/wmts/1.0" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:gml="http://www.opengis.net/gml" xsi:schemaLocation="http://www.opengis.net/wmts/1.0 http://schemas.opengis.net/wmts/1.0/wmtsGetCapabilities_response.xsd" version="1.0.0">
    <ows:ServiceIdentification>
        <ows:Title>WorldTimeZones</ows:Title>
        <ows:ServiceType>OGC WMTS</ows:ServiceType>
        <ows:ServiceTypeVersion>1.0.0</ows:ServiceTypeVersion>
    </ows:ServiceIdentification>
    <ows:OperationsMetadata>
        <ows:Operation name="GetTile">
            <ows:DCP>
                <ows:HTTP>
                    <ows:Get xlink:href="http://sampleserver6.arcgisonline.com/arcgis/rest/services/WorldTimeZones/MapServer/WMTS/tile/1.0.0/">
                        <ows:Constraint name="GetEncoding">
                            <ows:AllowedValues>
                                <ows:Value>RESTful</ows:Value>
                            </ows:AllowedValues>
                        </ows:Constraint>
                    </ows:Get>
                    <ows:Get xlink:href="http://sampleserver6.arcgisonline.com/arcgis/rest/services/WorldTimeZones/MapServer/WMTS?">
                        <ows:Constraint name="GetEncoding">
                            <ows:AllowedValues>
                                <ows:Value>KVP</ows:Value>
                            </ows:AllowedValues>
                        </ows:Constraint>
                    </ows:Get>
                </ows:HTTP>
            </ows:DCP>
        </ows:Operation>
    </ows:OperationsMetadata>
    <Contents>
        <Layer>
            <ows:Title>WorldTimeZones</ows:Title>
            <ows:Identifier>WorldTimeZones</ows:Identifier>
            <ows:BoundingBox crs="urn:ogc:def:crs:EPSG::102100">
                <ows:LowerCorner>-2.0037507067161843E7 -3.024097195838617E7</ows:LowerCorner>
                <ows:UpperCorner>2.0037507067161843E7 3.0240971458386205E7</ows:UpperCorner>
            </ows:BoundingBox>
            <ows:WGS84BoundingBox crs="urn:ogc:def:crs:OGC:2:84">
                <ows:LowerCorner>-179.99999550841463 -88.99999992161119</ows:LowerCorner>
                <ows:UpperCorner>179.99999550841463 88.99999992161118</ows:UpperCorner>
            </ows:WGS84BoundingBox>
            <Style isDefault="true">
                <ows:Title>Default Style</ows:Title>
                <ows:Identifier>default</ows:Identifier>
            </Style>
            <Format>image/png</Format>
            <TileMatrixSetLink>
                <TileMatrixSet>GoogleMapsCompatible</TileMatrixSet>
            </TileMatrixSetLink>
            <ResourceURL format="image/png" resourceType="tile" template="http://sampleserver6.arcgisonline.com/arcgis/rest/services/WorldTimeZones/MapServer/WMTS/tile/1.0.0/WorldTimeZones/{Style}/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}.png" />
        </Layer>
        <TileMatrixSet>
            <ows:Title>GoogleMapsCompatible</ows:Title>
            <ows:Abstract>the wellknown 'GoogleMapsCompatible' tile matrix set defined by OGC WMTS specification</ows:Abstract>
            <ows:Identifier>GoogleMapsCompatible</ows:Identifier>
            <ows:SupportedCRS>urn:ogc:def:crs:EPSG:6.18:3:3857</ows:SupportedCRS>
            <WellKnownScaleSet>urn:ogc:def:wkss:OGC:1.0:GoogleMapsCompatible</WellKnownScaleSet>
            <TileMatrix>
                <ows:Identifier>5</ows:Identifier>
                <ScaleDenominator>17471320.75089743</ScaleDenominator>
                <TopLeftCorner>-20037508.34278925 20037508.34278925</TopLeftCorner>
                <TileWidth>256</TileWidth>
                <TileHeight>256</TileHeight>
                <MatrixWidth>32</MatrixWidth>
                <MatrixHeight>32</MatrixHeight>
            </TileMatrix>
        </TileMatrixSet>
    </Contents>
    <ServiceMetadataURL xlink:href="http://sampleserver6.arcgisonline.com/arcgis/rest/services/WorldTimeZones/MapServer/WMTS/1.0.0/WMTSCapabilities.xml" />
</Capabilities>
--></div>

<div id="multi-getile-2"><!--
<?xml version="1.0" encoding="UTF-8"?>
<Capabilities xmlns="http://www.opengis.net/wmts/1.0" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:gml="http://www.opengis.net/gml" xsi:schemaLocation="http://www.opengis.net/wmts/1.0 http://schemas.opengis.net/wmts/1.0/wmtsGetCapabilities_response.xsd" version="1.0.0">
    <ows:OperationsMetadata>
        <ows:Operation name="GetCapabilities">
            <ows:DCP>
                <ows:HTTP>
                    <ows:Get xlink:href="http://wmts.geo.admin.ch/1.0.0/WMTSCapabilities.xml">
                        <ows:Constraint name="GetEncoding">
                            <ows:AllowedValues>
                                <ows:Value>REST</ows:Value>
                            </ows:AllowedValues>
                        </ows:Constraint>
                    </ows:Get>
                </ows:HTTP>
            </ows:DCP>
        </ows:Operation>
        <ows:Operation name="GetTile">
            <ows:DCP>
                <ows:HTTP>
                    <ows:Get xlink:href="http://wmts.geo.admin.ch/kvp">
                        <ows:Constraint name="GetEncoding">
                            <ows:AllowedValues>
                                <ows:Value>KVP</ows:Value>
                            </ows:AllowedValues>
                        </ows:Constraint>
                    </ows:Get>
                    <ows:Get xlink:href="http://wmts.geo.admin.ch/rest">
                        <ows:Constraint name="GetEncoding">
                            <ows:AllowedValues>
                                <ows:Value>REST</ows:Value>
                            </ows:AllowedValues>
                        </ows:Constraint>
                    </ows:Get>
                </ows:HTTP>
            </ows:DCP>
        </ows:Operation>
    </ows:OperationsMetadata>
    <Contents>
        <Layer>
            <ows:Title>Agglomérations et villes isolées</ows:Title>
            <ows:Abstract>Les agglomérations et villes isolées (communes non rattachées à une agglomération et comptant au moins 10`000 habitants) font partie des régions d’analyse de la statistique suisse. Ce niveau géographique est défini depuis plus de 100 ans, afin de mesurer l’urbanisation, phénomène fondamental structurant l’organisation du territoire. Sa fonction principale est de permettre une comparaison spatiale entre des espaces urbains inégalement délimités sur le plan institutionnel. Une version ancienne est appliquée pour la première fois en 1930, puis révisée en 1984 et 1990, toujours sur la base des recensements de la population. La version actuelle classe les 2896 communes de Suisse (état 2000) selon leur appartenance ou pas à une agglomération ou ville isolée en fonction de critères statistiques (Etat et évolution de la population, lien de continuité de la zone bâtie, rapport entre population active occupée et population résidante, structure économique et flux de pendulaires). Les agglomérations et les villes isolées forment l`espace urbain, les territoires restant l`espace rural. La définition des agglomérations de l’OFS n’a pas valeur d’obligation légale.</ows:Abstract>
            <ows:WGS84BoundingBox>
                <ows:LowerCorner>5.140242 45.398181</ows:LowerCorner>
                <ows:UpperCorner>11.47757 48.230651</ows:UpperCorner>
            </ows:WGS84BoundingBox>
            <ows:Identifier>ch.are.agglomerationen_isolierte_staedte-2000</ows:Identifier>
            <ows:Metadata xlink:href="http://www.swisstopo.admin.ch/SITiled/world/AdminBoundaries/metadata.htm"/>
            <Style>
                <ows:Title>Agglomérations et villes isolées</ows:Title>
                <ows:Identifier>ch.are.agglomerationen_isolierte_staedte-2000</ows:Identifier>
                <LegendURL format="image/png" xlink:href="http://api.geo.admin.ch/legend/ch.are.agglomerationen_isolierte_staedte-2000_fr.png" />
            </Style>
            <Format>image/png</Format>
            <Dimension>
                <ows:Identifier>Time</ows:Identifier>
                <Default>20090101</Default>
                <Value>20090101</Value>
            </Dimension>
            <TileMatrixSetLink>
                <TileMatrixSet>21781</TileMatrixSet>
            </TileMatrixSetLink>
        </Layer>
        <TileMatrixSet>
            <ows:Identifier>21781</ows:Identifier>
            <ows:SupportedCRS>urn:ogc:def:crs:EPSG:1.0:21781</ows:SupportedCRS>
            <TileMatrix>
                <ows:Identifier>0</ows:Identifier>
                <ScaleDenominator>14285750.5715</ScaleDenominator>
                <TopLeftCorner>420000.0 350000.0</TopLeftCorner>
                <TileWidth>256</TileWidth>
                <TileHeight>256</TileHeight>
                <MatrixWidth>1</MatrixWidth>
                <MatrixHeight>1</MatrixHeight>
            </TileMatrix>
        </TileMatrixSet>
    </Contents>
    <ServiceMetadataURL xlink:href="http://www.opengis.uab.es/SITiled/world/1.0.0/WMTSCapabilities.xml"/>
</Capabilities>
--></div>

<div id="French-IGN-GeoPortal"><!--
<?xml version="1.0" encoding="UTF-8"?>
<Capabilities xmlns="http://www.opengis.net/wmts/1.0" xmlns:gml="http://www.opengis.net/gml" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0.0" xsi:schemaLocation="http://www.opengis.net/wmts/1.0 http://schemas.opengis.net/wmts/1.0/wmtsGetCapabilities_response.xsd">
    <ows:ServiceIdentification>
        <ows:Title>Service de visualisation WMTS</ows:Title>
        <ows:Abstract>Ce service permet la visualisation de couches de données raster IGN au travers d'un flux WMTS</ows:Abstract>
        <ows:Keywords>
            <ows:Keyword>Unités administratives</ows:Keyword>
            <ows:Keyword>Limites administratives</ows:Keyword>
        </ows:Keywords>
        <ows:ServiceType>OGC WMTS</ows:ServiceType>
        <ows:ServiceTypeVersion>1.0.0</ows:ServiceTypeVersion>
        <ows:Fees>licences</ows:Fees>
        <ows:AccessConstraints>Conditions Générales d'Utilisation disponibles ici : http://professionnels.ign.fr/sites/default/files/CGU_API_Pro.pdf</ows:AccessConstraints>
    </ows:ServiceIdentification>
    <ows:ServiceProvider>
        <ows:ProviderName>IGN</ows:ProviderName>
        <ows:ProviderSite xlink:href="" />
        <ows:ServiceContact>
            <ows:IndividualName>Géoportail SAV</ows:IndividualName>
            <ows:PositionName>custodian</ows:PositionName>
            <ows:ContactInfo>
                <ows:Phone>
                    <ows:Voice />
                    <ows:Facsimile />
                </ows:Phone>
                <ows:Address>
                    <ows:DeliveryPoint>73 avenue de Paris</ows:DeliveryPoint>
                    <ows:City>Saint Mandé</ows:City>
                    <ows:AdministrativeArea />
                    <ows:PostalCode>94160</ows:PostalCode>
                    <ows:Country>France</ows:Country>
                    <ows:ElectronicMailAddress>geop_services@geoportail.fr</ows:ElectronicMailAddress>
                </ows:Address>
            </ows:ContactInfo>
        </ows:ServiceContact>
    </ows:ServiceProvider>
    <ows:OperationsMetadata>
        <ows:Operation name="GetCapabilities">
            <ows:DCP>
                <ows:HTTP>
                    <ows:Get xlink:href="http://wxs.ign.fr/wnmz6nt68k09rw3f5vwaflk4/wmts?">
                        <ows:Constraint name="GetEncoding">
                            <ows:AllowedValues>
                                <ows:Value>KVP</ows:Value>
                            </ows:AllowedValues>
                        </ows:Constraint>
                    </ows:Get>
                </ows:HTTP>
            </ows:DCP>
        </ows:Operation>
        <ows:Operation name="GetTile">
            <ows:DCP>
                <ows:HTTP>
                    <ows:Get xlink:href="http://wxs.ign.fr/wnmz6nt68k09rw3f5vwaflk4/wmts?">
                        <ows:Constraint name="GetEncoding">
                            <ows:AllowedValues>
                                <ows:Value>KVP</ows:Value>
                            </ows:AllowedValues>
                        </ows:Constraint>
                    </ows:Get>
                </ows:HTTP>
            </ows:DCP>
        </ows:Operation>
    </ows:OperationsMetadata>
    <Contents>
        <Layer>
            <ows:Title>Limites administratives</ows:Title>
            <ows:Abstract>Représentation des limites administratives (régions, départements, cantons, communes)</ows:Abstract>
            <ows:Keywords>
                <ows:Keyword>Unités administratives</ows:Keyword>
            </ows:Keywords>
            <ows:WGS84BoundingBox>
                <ows:LowerCorner>-63.3725 -21.4756</ows:LowerCorner>
                <ows:UpperCorner>55.9259 72.679</ows:UpperCorner>
            </ows:WGS84BoundingBox>
            <ows:Identifier>ADMINISTRATIVEUNITS.BOUNDARIES</ows:Identifier>
            <Style isDefault="true">
                <ows:Title>Données Brutes</ows:Title>
                <ows:Abstract>Données brutes sans changement de palette</ows:Abstract>
                <ows:Keywords>
                    <ows:Keyword>Défaut</ows:Keyword>
                </ows:Keywords>
                <ows:Identifier>normal</ows:Identifier>
                <LegendURL format="image/png" height="1" maxScaleDenominator="100000000" minScaleDenominator="200" width="1" xlink:href="http://gpp3-wxs.ign.fr/static/LEGENDES/NOLEGEND.JPG" />
            </Style>
            <Format>image/png</Format>
            <InfoFormat>text/plain</InfoFormat>
            <InfoFormat>text/html</InfoFormat>
            <InfoFormat>application/vnd.ogc.gml</InfoFormat>
            <TileMatrixSetLink>
                <TileMatrixSet>PM</TileMatrixSet>
                <TileMatrixSetLimits>
                    <TileMatrixLimits>
                        <TileMatrix>10</TileMatrix>
                        <MinTileRow>336</MinTileRow>
                        <MaxTileRow>576</MaxTileRow>
                        <MinTileCol>336</MinTileCol>
                        <MaxTileCol>671</MaxTileCol>
                    </TileMatrixLimits>
                    <TileMatrixLimits>
                        <TileMatrix>11</TileMatrix>
                        <MinTileRow>680</MinTileRow>
                        <MaxTileRow>1152</MaxTileRow>
                        <MinTileCol>672</MinTileCol>
                        <MaxTileCol>1344</MaxTileCol>
                    </TileMatrixLimits>
                    <TileMatrixLimits>
                        <TileMatrix>12</TileMatrix>
                        <MinTileRow>1368</MinTileRow>
                        <MaxTileRow>2304</MaxTileRow>
                        <MinTileCol>1344</MinTileCol>
                        <MaxTileCol>2687</MaxTileCol>
                    </TileMatrixLimits>
                    <TileMatrixLimits>
                        <TileMatrix>13</TileMatrix>
                        <MinTileRow>2736</MinTileRow>
                        <MaxTileRow>4608</MaxTileRow>
                        <MinTileCol>2688</MinTileCol>
                        <MaxTileCol>5376</MaxTileCol>
                    </TileMatrixLimits>
                    <TileMatrixLimits>
                        <TileMatrix>14</TileMatrix>
                        <MinTileRow>5472</MinTileRow>
                        <MaxTileRow>9200</MaxTileRow>
                        <MinTileCol>5376</MinTileCol>
                        <MaxTileCol>10735</MaxTileCol>
                    </TileMatrixLimits>
                    <TileMatrixLimits>
                        <TileMatrix>15</TileMatrix>
                        <MinTileRow>10943</MinTileRow>
                        <MaxTileRow>18384</MaxTileRow>
                        <MinTileCol>10624</MinTileCol>
                        <MaxTileCol>21472</MaxTileCol>
                    </TileMatrixLimits>
                    <TileMatrixLimits>
                        <TileMatrix>16</TileMatrix>
                        <MinTileRow>21904</MinTileRow>
                        <MaxTileRow>36768</MaxTileRow>
                        <MinTileCol>21264</MinTileCol>
                        <MaxTileCol>42943</MaxTileCol>
                    </TileMatrixLimits>
                    <TileMatrixLimits>
                        <TileMatrix>17</TileMatrix>
                        <MinTileRow>43824</MinTileRow>
                        <MaxTileRow>73520</MaxTileRow>
                        <MinTileCol>42528</MinTileCol>
                        <MaxTileCol>85871</MaxTileCol>
                    </TileMatrixLimits>
                    <TileMatrixLimits>
                        <TileMatrix>18</TileMatrix>
                        <MinTileRow>87648</MinTileRow>
                        <MaxTileRow>147024</MaxTileRow>
                        <MinTileCol>85071</MinTileCol>
                        <MaxTileCol>171743</MaxTileCol>
                    </TileMatrixLimits>
                    <TileMatrixLimits>
                        <TileMatrix>6</TileMatrix>
                        <MinTileRow>12</MinTileRow>
                        <MaxTileRow>29</MaxTileRow>
                        <MinTileCol>26</MinTileCol>
                        <MaxTileCol>42</MaxTileCol>
                    </TileMatrixLimits>
                    <TileMatrixLimits>
                        <TileMatrix>7</TileMatrix>
                        <MinTileRow>24</MinTileRow>
                        <MaxTileRow>58</MaxTileRow>
                        <MinTileCol>54</MinTileCol>
                        <MaxTileCol>84</MaxTileCol>
                    </TileMatrixLimits>
                    <TileMatrixLimits>
                        <TileMatrix>8</TileMatrix>
                        <MinTileRow>49</MinTileRow>
                        <MaxTileRow>114</MaxTileRow>
                        <MinTileCol>108</MinTileCol>
                        <MaxTileCol>168</MaxTileCol>
                    </TileMatrixLimits>
                    <TileMatrixLimits>
                        <TileMatrix>9</TileMatrix>
                        <MinTileRow>168</MinTileRow>
                        <MaxTileRow>288</MaxTileRow>
                        <MinTileCol>160</MinTileCol>
                        <MaxTileCol>336</MaxTileCol>
                    </TileMatrixLimits>
                </TileMatrixSetLimits>
            </TileMatrixSetLink>
        </Layer>
        <TileMatrixSet>
            <ows:Identifier>PM</ows:Identifier>
            <ows:SupportedCRS>EPSG:3857</ows:SupportedCRS>
            <TileMatrix>
                <ows:Identifier>0</ows:Identifier>
                <ScaleDenominator>559082264.0287178958533332</ScaleDenominator>
                <TopLeftCorner>-20037508 20037508</TopLeftCorner>
                <TileWidth>256</TileWidth>
                <TileHeight>256</TileHeight>
                <MatrixWidth>1</MatrixWidth>
                <MatrixHeight>1</MatrixHeight>
            </TileMatrix>
            <TileMatrix>
                <ows:Identifier>1</ows:Identifier>
                <ScaleDenominator>279541132.0143588959472254</ScaleDenominator>
                <TopLeftCorner>-20037508 20037508</TopLeftCorner>
                <TileWidth>256</TileWidth>
                <TileHeight>256</TileHeight>
                <MatrixWidth>2</MatrixWidth>
                <MatrixHeight>2</MatrixHeight>
            </TileMatrix>
            <TileMatrix>
                <ows:Identifier>10</ows:Identifier>
                <ScaleDenominator>545978.7734655447186469</ScaleDenominator>
                <TopLeftCorner>-20037508 20037508</TopLeftCorner>
                <TileWidth>256</TileWidth>
                <TileHeight>256</TileHeight>
                <MatrixWidth>1024</MatrixWidth>
                <MatrixHeight>1024</MatrixHeight>
            </TileMatrix>
            <TileMatrix>
                <ows:Identifier>11</ows:Identifier>
                <ScaleDenominator>272989.3867327723085907</ScaleDenominator>
                <TopLeftCorner>-20037508 20037508</TopLeftCorner>
                <TileWidth>256</TileWidth>
                <TileHeight>256</TileHeight>
                <MatrixWidth>2048</MatrixWidth>
                <MatrixHeight>2048</MatrixHeight>
            </TileMatrix>
            <TileMatrix>
                <ows:Identifier>12</ows:Identifier>
                <ScaleDenominator>136494.6933663861796617</ScaleDenominator>
                <TopLeftCorner>-20037508 20037508</TopLeftCorner>
                <TileWidth>256</TileWidth>
                <TileHeight>256</TileHeight>
                <MatrixWidth>4096</MatrixWidth>
                <MatrixHeight>4096</MatrixHeight>
            </TileMatrix>
            <TileMatrix>
                <ows:Identifier>13</ows:Identifier>
                <ScaleDenominator>68247.3466831930771477</ScaleDenominator>
                <TopLeftCorner>-20037508 20037508</TopLeftCorner>
                <TileWidth>256</TileWidth>
                <TileHeight>256</TileHeight>
                <MatrixWidth>8192</MatrixWidth>
                <MatrixHeight>8192</MatrixHeight>
            </TileMatrix>
            <TileMatrix>
                <ows:Identifier>14</ows:Identifier>
                <ScaleDenominator>34123.6733415965449154</ScaleDenominator>
                <TopLeftCorner>-20037508 20037508</TopLeftCorner>
                <TileWidth>256</TileWidth>
                <TileHeight>256</TileHeight>
                <MatrixWidth>16384</MatrixWidth>
                <MatrixHeight>16384</MatrixHeight>
            </TileMatrix>
            <TileMatrix>
                <ows:Identifier>15</ows:Identifier>
                <ScaleDenominator>17061.8366707982724577</ScaleDenominator>
                <TopLeftCorner>-20037508 20037508</TopLeftCorner>
                <TileWidth>256</TileWidth>
                <TileHeight>256</TileHeight>
                <MatrixWidth>32768</MatrixWidth>
                <MatrixHeight>32768</MatrixHeight>
            </TileMatrix>
            <TileMatrix>
                <ows:Identifier>16</ows:Identifier>
                <ScaleDenominator>8530.9183353991362289</ScaleDenominator>
                <TopLeftCorner>-20037508 20037508</TopLeftCorner>
                <TileWidth>256</TileWidth>
                <TileHeight>256</TileHeight>
                <MatrixWidth>65536</MatrixWidth>
                <MatrixHeight>65536</MatrixHeight>
            </TileMatrix>
            <TileMatrix>
                <ows:Identifier>17</ows:Identifier>
                <ScaleDenominator>4265.4591676995681144</ScaleDenominator>
                <TopLeftCorner>-20037508 20037508</TopLeftCorner>
                <TileWidth>256</TileWidth>
                <TileHeight>256</TileHeight>
                <MatrixWidth>131072</MatrixWidth>
                <MatrixHeight>131072</MatrixHeight>
            </TileMatrix>
            <TileMatrix>
                <ows:Identifier>18</ows:Identifier>
                <ScaleDenominator>2132.7295838497840572</ScaleDenominator>
                <TopLeftCorner>-20037508 20037508</TopLeftCorner>
                <TileWidth>256</TileWidth>
                <TileHeight>256</TileHeight>
                <MatrixWidth>262144</MatrixWidth>
                <MatrixHeight>262144</MatrixHeight>
            </TileMatrix>
            <TileMatrix>
                <ows:Identifier>19</ows:Identifier>
                <ScaleDenominator>1066.3647919248918304</ScaleDenominator>
                <TopLeftCorner>-20037508 20037508</TopLeftCorner>
                <TileWidth>256</TileWidth>
                <TileHeight>256</TileHeight>
                <MatrixWidth>524288</MatrixWidth>
                <MatrixHeight>524288</MatrixHeight>
            </TileMatrix>
            <TileMatrix>
                <ows:Identifier>2</ows:Identifier>
                <ScaleDenominator>139770566.0071793960087234</ScaleDenominator>
                <TopLeftCorner>-20037508 20037508</TopLeftCorner>
                <TileWidth>256</TileWidth>
                <TileHeight>256</TileHeight>
                <MatrixWidth>4</MatrixWidth>
                <MatrixHeight>4</MatrixHeight>
            </TileMatrix>
            <TileMatrix>
                <ows:Identifier>20</ows:Identifier>
                <ScaleDenominator>533.1823959624461134</ScaleDenominator>
                <TopLeftCorner>-20037508 20037508</TopLeftCorner>
                <TileWidth>256</TileWidth>
                <TileHeight>256</TileHeight>
                <MatrixWidth>1048576</MatrixWidth>
                <MatrixHeight>1048576</MatrixHeight>
            </TileMatrix>
            <TileMatrix>
                <ows:Identifier>21</ows:Identifier>
                <ScaleDenominator>266.5911979812228585</ScaleDenominator>
                <TopLeftCorner>-20037508 20037508</TopLeftCorner>
                <TileWidth>256</TileWidth>
                <TileHeight>256</TileHeight>
                <MatrixWidth>2097152</MatrixWidth>
                <MatrixHeight>2097152</MatrixHeight>
            </TileMatrix>
            <TileMatrix>
                <ows:Identifier>3</ows:Identifier>
                <ScaleDenominator>69885283.0035897239868063</ScaleDenominator>
                <TopLeftCorner>-20037508 20037508</TopLeftCorner>
                <TileWidth>256</TileWidth>
                <TileHeight>256</TileHeight>
                <MatrixWidth>8</MatrixWidth>
                <MatrixHeight>8</MatrixHeight>
            </TileMatrix>
            <TileMatrix>
                <ows:Identifier>4</ows:Identifier>
                <ScaleDenominator>34942641.5017948619934032</ScaleDenominator>
                <TopLeftCorner>-20037508 20037508</TopLeftCorner>
                <TileWidth>256</TileWidth>
                <TileHeight>256</TileHeight>
                <MatrixWidth>16</MatrixWidth>
                <MatrixHeight>16</MatrixHeight>
            </TileMatrix>
            <TileMatrix>
                <ows:Identifier>5</ows:Identifier>
                <ScaleDenominator>17471320.7508974309967016</ScaleDenominator>
                <TopLeftCorner>-20037508 20037508</TopLeftCorner>
                <TileWidth>256</TileWidth>
                <TileHeight>256</TileHeight>
                <MatrixWidth>32</MatrixWidth>
                <MatrixHeight>32</MatrixHeight>
            </TileMatrix>
            <TileMatrix>
                <ows:Identifier>6</ows:Identifier>
                <ScaleDenominator>8735660.3754487154983508</ScaleDenominator>
                <TopLeftCorner>-20037508 20037508</TopLeftCorner>
                <TileWidth>256</TileWidth>
                <TileHeight>256</TileHeight>
                <MatrixWidth>64</MatrixWidth>
                <MatrixHeight>64</MatrixHeight>
            </TileMatrix>
            <TileMatrix>
                <ows:Identifier>7</ows:Identifier>
                <ScaleDenominator>4367830.1877243577491754</ScaleDenominator>
                <TopLeftCorner>-20037508 20037508</TopLeftCorner>
                <TileWidth>256</TileWidth>
                <TileHeight>256</TileHeight>
                <MatrixWidth>128</MatrixWidth>
                <MatrixHeight>128</MatrixHeight>
            </TileMatrix>
            <TileMatrix>
                <ows:Identifier>8</ows:Identifier>
                <ScaleDenominator>2183915.0938621788745877</ScaleDenominator>
                <TopLeftCorner>-20037508 20037508</TopLeftCorner>
                <TileWidth>256</TileWidth>
                <TileHeight>256</TileHeight>
                <MatrixWidth>256</MatrixWidth>
                <MatrixHeight>256</MatrixHeight>
            </TileMatrix>
            <TileMatrix>
                <ows:Identifier>9</ows:Identifier>
                <ScaleDenominator>1091957.5469310886252288</ScaleDenominator>
                <TopLeftCorner>-20037508 20037508</TopLeftCorner>
                <TileWidth>256</TileWidth>
                <TileHeight>256</TileHeight>
                <MatrixWidth>512</MatrixWidth>
                <MatrixHeight>512</MatrixHeight>
            </TileMatrix>
        </TileMatrixSet>
    </Contents>
</Capabilities>
--></div>

</body>
</html>
